<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/demo/dimissionapproval/dimissionapproval.jsx此处编写
 -->
<template>
    <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields"
        :editFormOptions="editFormOptions" :searchFormFields="searchFormFields" :searchFormOptions="searchFormOptions"
        :table="table" :extend="extend">
    </view-grid>
</template>
<script>
import extend from "@/extension/demo/dimissionapproval/dimissionapproval.jsx";
import { ref, defineComponent } from "vue";
export default defineComponent({
    setup() {
        const table = ref({
            key: 'DimissionApprovalId',
            footer: "Foots",
            cnName: '离职办理审批',
            name: 'dimissionapproval/dimissionapproval',
            url: "/approval-read/api/dimissionapproval/",
            sortName: "CreateTime"
        });
        const editFormFields = ref({});
        const editFormOptions = ref([]);
        const searchFormFields = ref({ "DepartName": "", "PositionName": "", "EmploysName": "", "OnboardingDate": "", "LastWorkDate": "", "ApprovalType": "" });
        const searchFormOptions = ref([[{ "title": "员工姓名", "field": "EmploysName", "type": "like" }, { "dataKey": "部门下拉框", "data": [], "title": "部门", "field": "DepartName", "type": "select" }, { "dataKey": "职位下拉框", "data": [], "title": "职位", "field": "PositionName", "type": "select" }], [{ "title": "入职时间", "field": "OnboardingDate", "type": "date" }, { "title": "最后工作日", "field": "LastWorkDate", "type": "date" }, { "dataKey": "审批状态下拉框", "data": [], "title": "审批状态", "field": "ApprovalType", "type": "select" }]]);
        const columns = ref([{ field: 'DimissionApprovalId', title: '主键', type: 'string', width: 110, hidden: true, readonly: true, require: true, align: 'left' },
        { field: 'DepartName', title: '部门', type: 'string', bind: { key: '部门下拉框', data: [] }, width: 110, align: 'left', sort: true },
        { field: 'PositionName', title: '职位', type: 'string', bind: { key: '职位下拉框', data: [] }, width: 110, align: 'left' },
        { field: 'EmploysName', title: '员工姓名', type: 'string', width: 110, align: 'left' },
        { field: 'LeaderName', title: '上级负责人', type: 'string', width: 110, align: 'left' },
        { field: 'OnboardingDate', title: '入职时间', type: 'datetime', width: 150, align: 'left', sort: true },
        { field: 'LastWorkDate', title: '最后工作日', type: 'datetime', width: 150, align: 'left', sort: true },
        { field: 'DimissionResult', title: '离职原因', type: 'string', width: 120, align: 'left' },
        { field: 'ApprovalRemark', title: '审批备注', type: 'string', width: 120, align: 'left' },
        { field: 'ApprovalType', title: '审批状态', type: 'int', bind: { key: '审批状态下拉框', data: [] }, width: 110, align: 'left' },
        { field: 'ApprovalName', title: '审批人', type: 'string', width: 110, align: 'left' },
        { field: 'CreateName', title: '创建人', type: 'string', width: 110, align: 'left' },
        { field: 'CreateTime', title: '创建时间', type: 'datetime', width: 150, align: 'left', sort: true },
        { field: 'UpdateName', title: '修改人', type: 'string', width: 110, hidden: true, align: 'left' },
        { field: 'UpdateTime', title: '修改时间', type: 'datetime', width: 150, hidden: true, align: 'left', sort: true },
        { field: 'IsDel', title: '逻辑删除', type: 'int', width: 110, hidden: true, align: 'left' }]);
        const detail = ref({
            cnName: "#detailCnName",
            table: "#detailTable",
            columns: [],
            sortName: "",
            key: ""
        });
        return {
            table,
            extend,
            editFormFields,
            editFormOptions,
            searchFormFields,
            searchFormOptions,
            columns,
            detail,
        };
    },
});
</script>
